#pragma once

#include "Base/AbstractHandler.h"

namespace TCServer
{
    namespace RPHandler
    {
        class UserHandler : public AbstractHandler
        {
        private:
            UserHandler();
        public:
            ~UserHandler();
        public:
            // Client Request Handlers
            void login(QSslSocket *s, QVariantMap args);
            void usernameExist(QSslSocket *s, QVariantMap args);
            void emailExist(QSslSocket *s, QVariantMap args);
            void phoneExist(QSslSocket *s, QVariantMap args);
            void registerWithUsername(QSslSocket *s, QVariantMap args);
            void registerWithEmail(QSslSocket *s, QVariantMap args);
            void registerWithPhone(QSslSocket *s, QVariantMap args);
            void changeInfo(QSslSocket *s, QVariantMap args);
            void changePassword(QSslSocket *s, QVariantMap args);
            void queryInfo(QSslSocket *s, QVariantMap args);
        public:
            // used for server
        public:
            static UserHandler* instance();
        };
    }
}